package com.boardgame.gwt.repository;

import com.boardgame.gwt.entity.GwtGameDbInfo;
import com.boardgame.gwt.enums.GameStatus;
import com.boardgame.gwt.enums.GameType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by pdybka on 30.05.16.
 */
@Repository
public interface GwtGameInfoRepository extends JpaRepository<GwtGameDbInfo, Long> {
    List<GwtGameDbInfo> findByGameTypeAndGameStatus(GameType GameType, GameStatus GameStatus);
    List<GwtGameDbInfo> findByGameStatus(GameStatus gameStatus);
    GwtGameDbInfo findOneByGameName(String gameName);
    //List<GwtGameInfo> findByGameName(String gameName);
    boolean existsGwtGameInfoByGameName(String gameName);
}
